package com.bwda.dsrs.systemservice.domain.form.userinformation;

import com.bwda.dsrs.base.centerbase.condition.BaseCondition;
import com.bwda.dsrs.base.util.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author yangjun
 */
@Data
@ApiModel(description = "用户详情表")
public class UserInformationUpdateForm {

    @ApiModelProperty(value = "用户编码", required = true)
    @NotNull(message = "用户编码不能为空")
    private String userCode;

    @ApiModelProperty(value = "0女1男")
    private Integer sex;

    @ApiModelProperty(value = "出生日期,格式为:" + DateUtil.FORMAT)
    @DateTimeFormat(pattern = DateUtil.FORMAT)
    private Date bornDate;

    @ApiModelProperty(value = "籍贯")
    private String nativePlace;

    @ApiModelProperty(value = "身份证，男女出生日期以身份证为准")
    private String identityCard;

    @ApiModelProperty(value = "学历")
    private String degree;

    @ApiModelProperty(value = "毕业学校")
    private String graduateSchool;

    @ApiModelProperty(value = "固定电话")
    private String telphone;

    @ApiModelProperty(value = "传真")
    private String fax;

    @ApiModelProperty(value = "工作职业")
    private String profession;

    @ApiModelProperty(value = "工作岗位")
    private String jobPost;

    @ApiModelProperty(value = "职务")
    private String position;

    @ApiModelProperty(value = "办公地址")
    private String officeAddress;

    @ApiModelProperty(value = "公司名称")
    private String companyName;

    @ApiModelProperty(value = "公司地址")
    private String companyAddress;

    @ApiModelProperty(value = "家庭住址")
    private String homeAddress;

    public Date getBornDate() {
        if (bornDate != null){
            return (Date) bornDate.clone();
        }

        return null;
    }

    public void setBornDate(Date bornDate) {
        if (bornDate != null){
            this.bornDate = (Date) bornDate.clone();
        }
    }
}